Smoothing

Ryan Miller

Signal and Noise

Smoothing

Regression in Two-dimensions

LOESS

Animation from “Introduction to Data Science - Data Analysis and Prediction Algorithms with R” by Rafael A. Irizarry

LOESS

Animation from “Introduction to Data Science - Data Analysis and Prediction Algorithms with R” by Rafael A. Irizarry

LOESS

p1 <- ggplot(df, aes(x = x, y = y)) + geom_line(color = "red") + labs(title = "Signal")

p2 <- ggplot(df, aes(x = x, y = yy)) + geom_point() + geom_line(aes(x = df$x, y = df$y), color = "red") + geom_smooth(method = "loess", span = 0.2) + labs(title = "span = 0.2")

p3 <- ggplot(df, aes(x = x, y = yy)) + geom_point() + geom_line(aes(x = df$x, y = df$y), color = "red") + geom_smooth(method = "loess", span = 0.5) + labs(title = "span = 0.6")

grid.arrange(p1,p2,p3)

Splines

Takeaways